package com.ncs.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ncs.pojo.Stuff;
import com.ncs.service.StuffService;
import com.ncs.mapper.StuffMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Lenovo
* @description 针对表【stuff】的数据库操作Service实现
* @createDate 2022-09-05 14:33:14
*/
@Service
public class StuffServiceImpl extends ServiceImpl<StuffMapper, Stuff>
    implements StuffService{

    @Autowired
    StuffMapper stuffMapper;

    @Override
    public List<Stuff> findList() {
        List<Stuff> stuffs = stuffMapper.findList();
        return stuffs;
    }

    @Override
    public Stuff findOne(Integer id) {
        Stuff stuff=stuffMapper.findOne(id);
        return stuff;
    }

    @Override
    public void addOne(Stuff stuff) {
        stuffMapper.addOne(stuff);
    }

    @Override
    public void updateOne(Stuff stuff) {
        stuffMapper.updateOne(stuff);
    }

    @Override
    public void delOne(Integer id) {
        stuffMapper.delOne(id);
    }
}




